#pragma once

#include <QThread>
#include "xFFmpeg.h"
#include "XAudioPlay.h"
#include <list>
#include "QMutex"
using namespace std;
class XVideoThread :
	public QThread
{
public:
	QMutex mutex;
	virtual ~XVideoThread();
	static XVideoThread *Get()
	{
		static XVideoThread p;
		return &p;
	}
	void run();
	void exitPlay();
	void clearbuf();
	bool isexit = false;
	list<AVPacket> videos;
	int apts = -1;
private:
	XVideoThread();
};

